<?php
/* @var $this AdminLogController */
/* @var $model AdminLog */

$this->breadcrumbs=array(
	'Admin Logs'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List AdminLog', 'url'=>array('index')),
	array('label'=>'Create AdminLog', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#admin-log-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
    <ul class="breadcrumb">
        <li><i class="ace-icon fa fa-home home-icon"></i><a href="<?=$this->createUrl('default/index')?>">首页</a></li>
        <li><a href="<?=$this->createUrl('adminLog/index')?>">日志</a></li>
        <li class="active">日志列表</li>
    </ul><!-- /.breadcrumb -->
    <div class="nav-search" id="nav-search">
        <form class="form-search">
            <span class="input-icon">
                <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
                <i class="ace-icon fa fa-search nav-search-icon"></i>
            </span>
        </form>
    </div><!-- /.nav-search -->
</div><!-- /.breadcrumbs -->
<div class="page-content">
    <div class="page-header">
        <h1>日志
            <small><i class="ace-icon fa fa-angle-double-right"></i> Admin Logs</small>
            <small>
                <a href="<?=$this->createUrl('adminLog/delete')?>" class="btn btn-xs" title="删除" data-pjax="0" data-confirm="真的要删除吗？"><i class="fa fa-trash-o"></i> 删除</a>
            </small>
        </h1>
    </div><!-- /.page-header -->
    <div class="row">
        <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->
            <div class="row">
                <div class="col-xs-12">
                    <?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
                    <div class="search-form" style="display:none">
                        <?php $this->renderPartial('_search',array(
                            'model'=>$model,
                        )); ?>
                    </div><!-- search-form -->
<?php //var_dump($model);?>
                    <?php $this->widget('zii.widgets.grid.CGridView', array(
                        'id'=>'admin-log-grid',
                        'dataProvider'=>$model->search(),
                        'filter'=>$model,
                        'columns'=>array(
                            'id',
                            'user_id'=>array('name'=>'user_id','value'=>function($model){$data = AdminUser::model()->findByPk($model->user_id);return $data->username;}),
                            'route',
                            'description',
                            'created_at'=>array('name'=>'created_at','value'=>function($model){return date('Y-m-d H:i',$model->created_at);}),
                            'updated_at'=>array('name'=>'updated_at','value'=>function($model){return date('Y-m-d H:i',$model->updated_at);}),
                            array(
                                'class'=>'CButtonColumn',
                                //'headerOptions'=>array('width'=>'120')
                            ),
                        ),
                    )); ?>
                    <div class="pagination-xs">

                    </div>
                </div><!-- /.span -->
            </div><!-- /.row -->
            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
</div><!-- /.page-content -->




